<?php

namespace Shared\Main;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * 
 * @ORM\Entity(readOnly=true)
 * @ORM\Table(name="languages")
 */
class Language {

    const SLUG_BG = 'bg';
    const SLUG_EN = 'en';

    /**
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type="integer")
     */
    protected $id;

    /**
     * @ORM\Column(type="string")
     */
    protected $slug;

    /**
     * @ORM\Column(type="string")
     */
    protected $name;

    /**
     * @ORM\Column(type="boolean")
     */
    private $isDefault;

    /**
     * @ORM\Column
     */
    protected $LRCModifierClassName;
    
    /**
     * @ORM\Column
     */
    protected $intlFormatLocale;
    
    /**
     * @ORM\OneToMany(targetEntity="LanguageVariation", mappedBy="Language")
     */
    private $variations;
    
    public function __construct() {
        $this->variations = new ArrayCollection;
    }

    public function getId() {
        return $this->id;
    }

    public function getSlug() {
        return $this->slug;
    }

    public function getName() {
        return $this->name;
    }

    public function setId($id) {
        $this->id = $id;
    }

    public function setSlug($slug) {
        $this->slug = $slug;
    }

    public function setName($name) {
        $this->name = $name;
    }

    public function isDefault() {
        return $this->isDefault;
    }

    public function getIsDefault() {
        return $this->isDefault;
    }

    public function setIsDefault($isDefault) {
        $this->isDefault = $isDefault;
    }

    public function getLRCModifierClassName() {
        return $this->LRCModifierClassName;
    }

    public function setLRCModifierClassName($LRCModifierClassName) {
        $this->LRCModifierClassName = $LRCModifierClassName;
    }
    
    public function getIntlFormatLocale() {
        return $this->intlFormatLocale;
    }

    public function setIntlFormatLocale($intlFormatLocale) {
        $this->intlFormatLocale = $intlFormatLocale;
    }

    public function getVariations() {
        return $this->variations;
    }

    public function setVariations($variations) {
        $this->variations = $variations;
    }
}
